﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using CDSB.Indicators.Model;

namespace CDSB.Indicators.Communication
{
    public static class TFSWorkItemToCDSBWorkItem
    {
        public static CDSBWorkItem TranlateToCDSBWorkItem(this WorkItem workItem) 
        {
            CDSBWorkItem CDSBWorkItem = new CDSBWorkItem();

            CDSBWorkItem.ID = workItem.Id;
            CDSBWorkItem.Project = workItem.Project.Name;
            CDSBWorkItem.State = workItem.State;
            CDSBWorkItem.Title = workItem.Title;
            CDSBWorkItem.Area = workItem.AreaPath;
            
            return CDSBWorkItem;
        }


    }
}
